package com.cip.master.dao.impl;

import java.util.List;

import com.cip.admin.dao.impl.CipHibernateDAOSupport;
import com.cip.master.dao.EventDAO;
import com.cip.master.model.Event;

public class EventDAOImpl extends CipHibernateDAOSupport implements EventDAO {

	public Event saveOrUpdate(Event event) {
		getHibernateTemplate().saveOrUpdate(event);
		return event;
	}

	public List<Event> getAllEvent() throws Exception {
		return getCipHibernateTemplate().loadAll(Event.class);	
	}

	public Event getEvent(int id) {
		return getHibernateTemplate().get(Event.class, id);
	}

}
